package airportCoordination;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class SharedBoolean {
	private boolean value;
	private Lock lock;
	
	public SharedBoolean()
	{
		value = false;
		lock = new ReentrantLock();
	}
	
	public SharedBoolean(boolean v)
	{
		value = v;
		lock = new ReentrantLock();
	}
	
	public boolean value()
	{
		return value;
	}
	
	public void set(boolean v)
	{
		lock.lock();
		value = v;
		lock.unlock();
	}
}
